import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'userindex',
      redirect:'/user'
    },
    {
      path: '/user',
      name: 'userindex',
      component: () => import('./component/UserCenter.vue')
    },
    {
      path: '/catbuy',
      name: 'catbuy',
      component: () => import('./component/Catbuy.vue')
    },
    {
      path: '/userinfo',
      name: 'userinfo',
      component: () => import('./component/UserInfo.vue')
    },
    {
      path: '/cardfee',
      name: 'cardfee',
      component:() => import('./component/CardFee.vue')
    },
    {
      path: '/ordermanage',
      name: 'ordermanage',
      component: () => import('./component/OrderManage.vue')
    },
    {
      path: '/accountsafe',
      name: 'accountsafe',
      component: () => import('./component/AccountSafe.vue')
    },
    {
      path: '/tuijianma',
      name: 'tuijianma',
      component: () => import('./component/Recommend.vue')
    },
    {
      path: '/centercontract',
      name: 'centercontract',
      component: () => import('./component/CenterContract.vue')
    },
    {
      path: '/centeruseritems',
      name: 'centeruseritems',
      component: () => import('./component/UserItems.vue')
    },
    {
      path: '/pacakgerever',
      name: 'pacakgerever',
      component: () => import('./component/PacakgeRever.vue')
    },
   
    // {
    //   path: '/usercenter',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ './usercenter')
    // },
    // {
    //   path: '/list',
    //   name: 'list',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ './views/list.vue'),
    //   children:[
    //     {
    //       path: 'ly1',
    //       component: () => import(/* webpackChunkName: "about" */ './views/ly1.vue') 
    //     },
    //     {
    //       path: 'ly2',
    //       component: () => import(/* webpackChunkName: "about" */ './views/ly2.vue')
    //     }
    //   ]
    // }
  ]
})
